<template>
  <div class="content">
    <img class="backgroud" src="@/assets/img/404.png" alt />
    <div class="text main-text">出错了...页面失踪了</div>
    <el-button type="info" plain class="text" @click="back" icon="Back"
      >返回</el-button
    >
  </div>
</template>
​
<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
const back = () => {
  window.history.length > 1 ? router.go(-1) : router.push('/')
}
</script>
​
<style lang="scss" scoped>
.content {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  height: 100%;
  text-align: center;
  .backgroud {
    display: inline-block;
    width: 200px;
    height: 200px;
    margin-top: 80px;
  }
  .main-text {
    margin-top: 20px;
  }
  .text {
    font-size: 24px;
    font-weight: bold;
    color: #333;
  }
}
</style>
